//while循环输入，输入非数字退出循环

#include <stdio.h>

int main(void)
{
    float f1, f2;

    printf("Enter the first float: ");
    while (scanf("%f", &f1) == 1)
    {
        printf("Now enter the second float: ");
        if (scanf("%f", &f2) == 1)
            printf("(%.2f - %.2f) / (%.2f * %.2f) = %.4f\n", f1, f2, f1, f2, (f1 - f2) / (f1 * f2));
        else
            break;
        printf("Enter the first float (q to quit): ");
    }

    return 0;
}
